import request from '@/utils/request'

// 查询里程碑与工作项关联列表
export function listMilestoneWork(query) {
  return request({
    url: '/project/milestoneWork/list',
    method: 'get',
    params: query
  })
}

// 查询里程碑与工作项关联详细
export function getMilestoneWork(milestoneWorkItemId) {
  return request({
    url: '/project/milestoneWork/' + milestoneWorkItemId,
    method: 'get'
  })
}

// 新增里程碑与工作项关联
export function addMilestoneWork(data) {
  return request({
    url: '/project/milestoneWork',
    method: 'post',
    data: data
  })
}

// 修改里程碑与工作项关联
export function updateMilestoneWork(data) {
  return request({
    url: '/project/milestoneWork',
    method: 'put',
    data: data
  })
}

// 删除里程碑与工作项关联
export function delMilestoneWork(milestoneWorkItemId) {
  return request({
    url: '/project/milestoneWork/' + milestoneWorkItemId,
    method: 'delete'
  })
}
